/*fq*/
angular.module('indexApp')
    .controller('integralCtrl', function ($scope, $state, $rootScope, $http, $stateParams) {
        var vm = this;
        $scope.state = $state;
        vm.http = $rootScope.http;
        $http({
            method: 'post',
            url: vm.http + 'my_points',
            data: {
                user_id: $rootScope.id
            }
        })
            .then(function successCallback(res) {

                if (res.data.code == 0) {
                    console.log(res.data);
                    vm.data=res.data.data
                }
                else {
                    $rootScope.alert(res.data.msg)
                }

            }, function errorCallback(res) {// 请求失败执行代码
                $rootScope.alertError()
            });

    });